Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widgetfactory classify polygon #301

Merged
merged 26 commits into from
Sep 26, 2024
Merged

Conversation

hennie-k
Copy link
Contributor

No description provided.

if isinstance(layer, QgsVectorLayer):
fields = [field.name() for field in layer.fields()]
self.field_selector.addItems(fields)
print(f"[ClassifyPolyIntoClassesWidget] Fields added: {fields}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use print please. Use The QgsLogMessage class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made and tested

@@ -0,0 +1,70 @@
from qgis.PyQt.QtWidgets import QWidget, QVBoxLayout, QLabel, QComboBox
from qgis.PyQt.QtCore import pyqtSignal
from qgis.gui import QgsMapLayerComboBox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QgsFieldComboBox

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made and tested

self.layer_selector.setFilters(QgsMapLayerProxyModel.PolygonLayer)
self._layout.addWidget(self.layer_selector)

# Field selector
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QgsFieldComboBox

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made and tested

@timlinux timlinux merged commit 369a3a1 into main Sep 26, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants